package List顺序表;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-08-24
 * Time: 8:39
 */
public class Test {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);

        myArrayList.display();
        System.out.println();
        myArrayList.set(2, 10);
        myArrayList.display();
        System.out.println();
        myArrayList.remove(10);
        myArrayList.display();

    }
    public static void main2(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.get(10);
    }
    public static void main1(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);

        myArrayList.add(2, 10);
        myArrayList.display();
        System.out.println("============");
        myArrayList.get(10);
    }
}
